package item.inkcloud.userservice.service;


import item.inkcloud.userservice.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginUserService {

    @Autowired
    UserMapper userMapper;

     public  int login(String userid, String password){
        try {
            String pwd = userMapper.findPwdByUserID(userid);
            if(pwd.equals(password)){
                return 1;
            }else { return  0;}

        }catch (Exception e){

            return 0;
        }


    }

}
